﻿function ChangeCode() {
    var date = new Date();
    var myImg = document.getElementById("ImageCheck");
    var GUID = document.getElementById("lblGUID");

    if (GUID != null) {
        if (GUID.innerHTML != "" && GUID.innerHTML != null) {
            myImg.src = "../ValidateCode.aspx?GUID=" + GUID.innerHTML + "&flag=" + date.getMilliseconds()

        }
    }
    return false;
}

function validate() {
    var username = $("#txtUsername");
    var password = $("#txtPass");
    var checkcode = $("#CheckCode");
    if (username.val().length < 1) {
        alert("请输入用户名！");
        username.focus();
        return false;
    }
    if (password.val().length < 1) {
        alert("请输入密码！");
        password.focus();
        return false;
    }
    if (checkcode.val().length < 1) {
        alert("请输入验证码！");
        checkcode.focus();
        return false;
    }
    return true;
}